package com.wkbb.basic.utils.jvt;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author Alger Yang
 * @date 2019/9/24 002417:13
 */
@ConfigurationProperties("wkbb.jvt")
@Component
@Data
public class JvtBoxConfig {

    /**
     * CaptureEnabled : 1
     * CaptureAddress : http://server/path
     * CaptureType : 1
     * CaptureContent : {"FaceInfo":1,"CompareInfo":1}
     * PictureData : {"FacePicture":1,"BodyPicture":1,"BackgroundPicture":1,"PersonPhoto":1}
     * ResendTimes : 0
     * RegisterEnabled : 0
     * RegisterAddress : http://server/path
     * HeartbeatEnabled : 1
     * HeartbeatAddress : http://server/path
     * HeartbeatInterval : 60
     * SignCheck : 0
     * HTTPVersion : 1
     */

    @JSONField(name = "CaptureEnabled")
    private int captureEnabled;
    @JSONField(name = "CaptureAddress")
    private String captureAddress;
    @JSONField(name = "CaptureType")
    private int captureType;
    @JSONField(name = "CaptureContent")
    private CaptureContentBean captureContent;
    @JSONField(name = "PictureData")
    private PictureDataBean pictureData;
    @JSONField(name = "ResendTimes")
    private int resendTimes;
    @JSONField(name = "RegisterEnabled")
    private int registerEnabled;
    @JSONField(name = "RegisterAddress")
    private String registerAddress;
    @JSONField(name = "HeartbeatEnabled")
    private int heartbeatEnabled;
    @JSONField(name = "HeartbeatAddress")
    private String heartbeatAddress;
    @JSONField(name = "HeartbeatInterval")
    private int heartbeatInterval;
    @JSONField(name = "SignCheck")
    private int signCheck;
    @JSONField(name = "HTTPVersion")
    private int httpVersion;

    @Data
    public static class CaptureContentBean {
        /**
         * FaceInfo : 1
         * CompareInfo : 1
         */

        @JSONField(name = "FaceInfo")
        private int faceInfo;
        @JSONField(name = "CompareInfo")
        private int compareInfo;

    }

    @Data
    public static class PictureDataBean {
        /**
         * FacePicture : 1
         * BodyPicture : 1
         * BackgroundPicture : 1
         * PersonPhoto : 1
         */

        @JSONField(name = "FacePicture")
        private int facePicture;
        @JSONField(name = "BodyPicture")
        private int bodyPicture;
        @JSONField(name = "BackgroundPicture")
        private int backgroundPicture;
        @JSONField(name = "PersonPhoto")
        private int personPhoto;

    }
}
